package ddemo.service;

import ddemo.dao.AskMapper;
import ddemo.dao.InterfaceMapper;
import ddemo.factory.MapperProxyFactory;
import ddemo.pojo.Ask;
import ddemo.pojo.User;

import java.util.List;

public class AskService {
    private static AskMapper askMapper = MapperProxyFactory.getMapper(AskMapper.class);

    public static void shangpai(Integer id) {
        askMapper.shangpai(2,id);
        askMapper.deleteAskid(id);
    }

    public static void ask(User user) {
        askMapper.ask(user.getId(),user.getUsername(),user.getPhone_number());
    }

    public static List<Ask> getAskid() {
        return askMapper.getAskid();
    }
}
